{include file="public/header" /}
<div class="page">

    <form id="goods_class_form" method="post" action='inquiry_station_add'>
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder" style="background: rgb(255, 255, 255);">
                    <td class="required w120"><label class="validation">{$Think.lang.inquiry_name}:</label></td>
                    <td class="vatop rowform">
                        <select class="class-select" title="" style="min-width: 160px;" name='inquiry_id'>
                            <option value="0">{$Think.lang.ds_please_choose}...</option>
                            {foreach name="inquiry" item="v" key="k" }
                            <option value="{$v.id}" {if condition="$inquiry_id eq $v['id'] OR (!empty($stations) && $stations.inquiry_id eq $v['id'] )" } selected {/if}" >{$v.inquiry_name}</option>
                            {/foreach}
                        </select>
                    </td>
                    <td class="vatop tips"></td>
                </tr>

                <tr class="noborder" style="background: rgb(255, 255, 255);">
                    <td class="required w120"><label class="validation">{$Think.lang.station_name}:</label></td>
                    <td class="vatop rowform">
                        <input type="text" value="{$stations.station_name|default=''}" name="station_name" id="station_name" maxlength="50" class="txt">
                    </td>
                    <td class="vatop tips"></td>
                </tr>


                <tr class="noborder" style="background: rgb(255, 255, 255);">
                    <td class="required w120"><label class="validation">{$Think.lang.station_status}:</label></td>
                    <td class="vatop rowform">
                        <div class="onoff">
                            <label for="site_state1" class="cb-enable selected" >{$Think.lang.ds_open}</label>
                            <label for="site_state0" class="cb-disable">{$Think.lang.ds_close}</label>
                            <input id="site_state1"  name="status" value="1" type="radio" checked="checked">
                            <input id="site_state0" name="status" value="0" type="radio">
                        </div>
                    </td>
                    <td class="vatop tips"></td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="2">
                        <input class="btn" type="button" value="{$Think.lang.ds_submit}" />
                    </td>
                    <input type="hidden" name='station_id' value="{$stations.station_id|default=''}" title="">
                </tr>
            </tfoot>
        </table>
    </form>
</div>
<!--<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>-->
<!--<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>-->
<script>
    //按钮先执行验证再提交表单
    $(function() {
        $('.btn').click(function(){
            var station_name = $("#station_name").val();
            // 判断
            if(station_name.length == ''){
                alert('请输入工位标题');
                return false;
            }
            $('#goods_class_form').submit();
        });
    });
</script>


